package com.fansl.allround.study.designpattern.decorator;

/**
 * @author fansl
 * @Description: 装饰者的第二层
 * @date 2019/10/11 10:59
 */
public class Chilli extends Condiment {

    Humburger humburger;

    public Chilli(Humburger humburger){
        this.humburger = humburger;

    }

    @Override
    public String getName() {
        return humburger.getName()+" 加辣椒";
    }

    @Override
    public double getPrice() {
        //辣椒是免费的哦
        return humburger.getPrice();
    }
}
